class ConnectionsController(object):
    """
    Accepts and communicates with the server's many 
    connections.
    """
    def __init__(self, args):
        """
        Takes a dictionary of 
        class-specific arguments.
        """
        pass
    
    def set_parser(self, parser):
        """
        Sets the ParserController object to which 
        commands are sent.
        """
        self.parser = parser
    
    def send_response(self, user_id, response):
        """
        Forwards a response from its ParserController back 
        to the specified user.
        """
        raise UnimplementedError(self)
        
    def send_response_to_all(self, response):
        """
        Forwards a response to every connection.
        """
        raise UnimplementedError(self)
    
    def send_command(self, user, command):
        """
        Sends a command to the ParserController 
        for execution by the specified user.
        """
        raise UnimplementedError(self)
    
class StdInputConnectionsController(ConnectionsController):
    """
    Communicates via standard input/output/error handles.
    
    Included for testing purposes only.
    """
    def __init__(self, args):
        self.args = args
        
    def send_response(self, user_id, response):
        print user_id + " was told: " + response
        
    def send_response_to_all(self, response):
        print "Everyone should know: " + response
        
    def send_command(self, user_id, command):
        self.parser.send_command(user_id, command)
        